package com.zzptc.zzsgz.bdsjws.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.zzptc.zzsgz.bdsjws.vo.BBX;
import com.zzptc.zzsgz.bdsjws.vo.MobileInfo;
import com.zzptc.zzsgz.bdsjws.vo.User;

import com.zzptc.zzsgz.bdsjws.db.BBXDao;
import com.zzptc.zzsgz.bdsjws.db.MobileInfoDao;
import com.zzptc.zzsgz.bdsjws.db.UserDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig bBXDaoConfig;
    private final DaoConfig mobileInfoDaoConfig;
    private final DaoConfig userDaoConfig;

    private final BBXDao bBXDao;
    private final MobileInfoDao mobileInfoDao;
    private final UserDao userDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        bBXDaoConfig = daoConfigMap.get(BBXDao.class).clone();
        bBXDaoConfig.initIdentityScope(type);

        mobileInfoDaoConfig = daoConfigMap.get(MobileInfoDao.class).clone();
        mobileInfoDaoConfig.initIdentityScope(type);

        userDaoConfig = daoConfigMap.get(UserDao.class).clone();
        userDaoConfig.initIdentityScope(type);

        bBXDao = new BBXDao(bBXDaoConfig, this);
        mobileInfoDao = new MobileInfoDao(mobileInfoDaoConfig, this);
        userDao = new UserDao(userDaoConfig, this);

        registerDao(BBX.class, bBXDao);
        registerDao(MobileInfo.class, mobileInfoDao);
        registerDao(User.class, userDao);
    }
    
    public void clear() {
        bBXDaoConfig.clearIdentityScope();
        mobileInfoDaoConfig.clearIdentityScope();
        userDaoConfig.clearIdentityScope();
    }

    public BBXDao getBBXDao() {
        return bBXDao;
    }

    public MobileInfoDao getMobileInfoDao() {
        return mobileInfoDao;
    }

    public UserDao getUserDao() {
        return userDao;
    }

}
